<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
</head>
<body>
<input type="text" id="ipt">
 <button id="btn">我是一个按钮</button>
    <script>
        const ipt = document.querySelector('#ipt')
        const btn = document.querySelector('#btn')
        const myAxios = axios.create({
            baseURL:'/', //配置公共路径
            timeout:10000,//配置响应时间
            headers:{}//配置请求头
        })
        btn.onclick = async function(){
            const iptValue = ipt.value
            const inputV = await myAxios.get('/user', {
                params:{
                    userID :iptValue
                },
                query:{
                    A:'111'
                }

            })
            console.log(inputV);
        }
    </script>
</body>
</html>